package ac.github.os.internal.core.config.type

import ac.github.os.internal.core.config.DataType
import ac.github.os.internal.session.Session
import com.google.common.base.Enums
import org.bukkit.Particle
import taboolib.common.platform.ProxyParticle
import java.util.*

class DataParticle : DataType<ProxyParticle> {
    override fun toValue(string: String, session: Session): ProxyParticle? {
        return Enums.getIfPresent(ProxyParticle::class.java, string.uppercase(Locale.getDefault()))
            .or(ProxyParticle.FLAME)
    }
}